import request from '@/utils/request'

// 获取病人分页列表
export const getInsureList = (params) => {
  return request.get('/admin/insure/page', { params })
}

// 新增病人
export const addInsure = (data) => {
  return request.post('/admin/insure', data)
}

// 更新病人信息
export const updateInsure = (data) => {
  return request.put('/admin/insure', data)
}

// 删除病人
export const deleteInsure = (id) => {
  return request.delete(`/admin/insure/${id}`)
}

// 获取地区树形数据
export const getRegionTree = () => {
  return request.get('/admin/region/tree')
}

// 根据父ID获取子地区
export const getRegionsByParentId = (parentId) => {
  return request.get(`/admin/region/children/${parentId}`)
}
